home *** CD-ROM | disk | FTP | other *** search
- Path: aurora.LaTech.edu!usenet
- From: pluu@engr.LaTech.edu (PL)
- Newsgroups: comp.lang.c
- Subject: [Help] I can't find my error.
- Date: 22 Feb 1996 05:38:35 GMT
- Organization: LTU
- Message-ID: <4ggvgr$1b2@aurora.engr.LaTech.edu>
- Reply-To: pluu@engr.LaTech.edu
- NNTP-Posting-Host: pulsar.engr.latech.edu
-
-
- Hi, all;
- Could anyone please tell me why the following program won't work?
-
-
- *********************************************************
- /* This program will ask your name and age; and then
- will print your name and age for next year back */
-
- #include <stdio.h>
-
- main()
- {
- char name;
- int age, next_age;
-
- printf("%s\n","Please enter your name and age: ");
- scanf("%s%d\n", &name, &age);
- next_age= age + 1;
- printf("Hi, %s ,next year, you will be %d\n", name, next_age);
- }
- *********************************************************
-
-
- Thanks in advance....
-
-